﻿using System;
using System.Windows.Controls;

namespace MEF_Test.Bricks.Mediator
{
    public class ChangeMainViewMediation : IMediatorEvent
    {
        private Uri _viewUri;

        public Uri ViewUri
        {
            get { return _viewUri; }
            set 
            {
                if (_view != null)
                {
                    throw new NotSupportedException("The View and the ViewUri cannot be both set at the sametime : Please, choose only one View definition.");
                }
                _viewUri = value; 
            }
        }

        private Page _view;

        public Page View
        {
            get { return _view; }
            set 
            {
                if (_viewUri != null)
                {
                    throw new NotSupportedException("The View and the ViewUri cannot be both set at the sametime : Please, choose only one View definition.");
                }
                _view = value; 
            }
        }

    }
}
